package zhangqi.com.bind_demo;

import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;
import android.util.Log;
public class LeaderService extends Service {

    //绑定定时调用
    @Override
    public IBinder onBind(Intent intent) {
        //返回一个Binder对象，这个对象就是中间人对象
        return new Zjr();
    }

    //中间人
    class Zjr extends Binder implements PublicBusiness{
        public void qianxian(){ //牵线方法
            banzheng();
        }
        public void damajiang(){
            Log.i("zhangqi","陪领导打麻将");
        }
    }

    public void banzheng(){
        Log.i("zhangqi","领导帮你来办证");
    }

}
